package com.lh.tams.dao;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.lh.tams.dao.base.HibernateBaseDao;
import com.lh.tams.domain.TamsSimple;
import com.lh.tams.util.Page;
/**
 * 简易案件处理dao
 * @author liulin
 *
 */
@Repository
public class SimpleDao extends HibernateBaseDao{
	@SuppressWarnings("unchecked")
	public TamsSimple getCaseSimpleByNo(String caseNo){
		List<Object> args=new ArrayList<Object>();
		StringBuilder hql=new StringBuilder();
		hql.append("from TamsSimple t where t.caseNo=?");
		args.add(caseNo);
		Page page = super.queryForList(hql.toString(), args.toArray(), 1, 10);
		List<TamsSimple> lists = (List<TamsSimple>)page.getRows();
		return lists.get(0);
	}
}
